package com.ccp.dev.workflow.model;

import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * ClassDescribe
 * @author: fanruiqi
 * Date: 2019-09-20
 * Since:1
 * To change this template use File | Settings | File Templates.
 */
public class AgentCondition extends BaseModel<AgentCondition> {
    //等于
    public static final  short OPERATE_TYPE_EQUAL= 0;
    //不等于
    public static final  short OPERATE_TYPE_UNEQUAL= 1;
    //大于
    public static final  short OPERATE_TYPE_MORE_THAN = 2;
    //大于等于
    public static final  short OPERATE_TYPE_MORE_EQUAL_THAN = 3;
    //小于
    public static final  short OPERATE_TYPE_LESS_THAN = 4;
    //小于
    public static final  short OPERATE_TYPE_LESS_EQUAL_THAN = 5;
    //字符串的等于
    public static final  short OPERATE_TYPE_LIKE = 6;
    //字符串的等于
    public static final  short OPERATE_TYPE_UNLIKE = 7;

    //变量为数字类型
    public static final  String VARIABLE_TYPE_NUMBER = "number";
    //变量为日期类型
    public static final  String VARIABLE_TYPE_DATE = "date";
    //变量为日期类型
    public static final  String VARIABLE_TYPE_STRING= "varchar";

    /**
     *  主键
     */
    protected String  id;
    /**
     * 流程设定ID
     */
    protected String  settingId;
    /**
     *  条件
     */
    protected String  condition;
    /**
     *  备注
     */
    protected String  memo;
    /**
     * 代理人ID
     */
    protected String  agentId;
    /**
     * 代理人
     */
    protected String  agent;
    public void setId(String id)
    {
        this.id = id;
    }
    /**
     * 返回 主键
     */
    public String getId()
    {
        return this.id;
    }
    public void setSettingId(String settingId)
    {
        this.settingId = settingId;
    }
    /**
     * 返回 流程设定ID
     */
    public String getSettingId()
    {
        return this.settingId;
    }
    public void setCondition(String condition)
    {
        this.condition = condition;
    }
    /**
     * 返回 条件
     */
    public String getCondition()
    {
        return this.condition;
    }
    public void setMemo(String memo)
    {
        this.memo = memo;
    }
    /**
     * 返回 备注
     */
    public String getMemo()
    {
        return this.memo;
    }
    public void setAgentId(String agentId)
    {
        this.agentId = agentId;
    }
    /**
     * 返回 代理人ID
     */
    public String getAgentId()
    {
        return this.agentId;
    }
    public void setAgent(String agent)
    {
        this.agent = agent;
    }
    /**
     * 返回 代理人
     */
    public String getAgent()
    {
        return this.agent;
    }


    /**
     * @see Object#equals(Object)
     */
    @Override
    public boolean equals(Object object)
    {
        if (!(object instanceof AgentCondition))
        {
            return false;
        }
        AgentCondition rhs = (AgentCondition) object;
        return new EqualsBuilder()
                .append(this.id, rhs.id)
                .append(this.settingId, rhs.settingId)
                .append(this.condition, rhs.condition)
                .append(this.memo, rhs.memo)
                .append(this.agentId, rhs.agentId)
                .append(this.agent, rhs.agent)
                .isEquals();
    }

    /**
     * @see Object#hashCode()
     */
    @Override
    public int hashCode()
    {
        return new HashCodeBuilder(-82280557, -700257973)
                .append(this.id)
                .append(this.settingId)
                .append(this.condition)
                .append(this.memo)
                .append(this.agentId)
                .append(this.agent)
                .toHashCode();
    }

    /**
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        return new ToStringBuilder(this)
                .append("id", this.id)
                .append("settingId", this.settingId)
                .append("condition", this.condition)
                .append("memo", this.memo)
                .append("agentId", this.agentId)
                .append("agent", this.agent)
                .toString();
    }


}
